﻿// satellite_ephemeris.h
#ifndef SATELLITE_EPHEMERIS_H
#define SATELLITE_EPHEMERIS_H

#include "GNSSSatPos.h"

class EphemerisParser {
public:
    static std::vector<SatelliteEphemeris> parseEphemeris(const std::vector<std::string>& lines);
    static SatelliteEphemeris findEphemerisByPRN(const std::vector<SatelliteEphemeris>& list, const std::string& prn);
};

class SatelliteOrbitCalculator {
private:
    static constexpr double EARTH_GM = 3.986004418e14;  // 地球引力常数
    static constexpr double EARTH_OMEGA = 7.292115e-5;  // 地球自转角速度

public:
    static CartesianPoint calculateSatPosition(const SatelliteEphemeris& eph, double transmitTime);

private:
    static double solveKeplerEquation(double M, double e);
};

#endif